Skip to content

Fix feature flag refresh detection when page status is string#334

Closed
IvanTheBearable wants to merge 1 commit into
Azure:mainfrom
IvanTheBearable:333-FFRefresh
Closed

Fix feature flag refresh detection when page status is string#334
IvanTheBearable wants to merge 1 commit into
Azure:mainfrom
IvanTheBearable:333-FFRefresh

Conversation

@IvanTheBearable

@IvanTheBearable IvanTheBearable commented Jun 26, 2026

Copy link
Copy Markdown

Summary

Feature-flag refresh change detection currently assumes page response status is numeric. In some runtime paths, status is returned as a string, which prevents detecting a valid 200 response and can leave feature flags stale.

Addresses issue #333

What changed

  • Normalize page response status with Number(...) in refresh change detection
  • Add regression test support for string status responses
  • Add a dynamic refresh feature-flag test that reproduces and verifies the string-status scenario

Why

This makes change detection robust across status value types and prevents false no-change outcomes when status is "200".

Validation

Built test outputs
Ran refresh test suite for both ESM and CJS artifacts
All tests passed, including the new regression scenario

The underlying HTTP response status can sometimes be a string (e.g., "200") instead of a number (200). Explicitly cast the status to a number to ensure conditional refresh logic works correctly in all cases.
@IvanTheBearable IvanTheBearable marked this pull request as ready for review June 26, 2026 04:03
@zhiyuanliang-ms

Copy link
Copy Markdown
Member

Thanks for contribution @IvanTheBearable
We’ve moved the fix to #335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants